﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Adams.Shared
{
    public static class UrlHelper
    {
        public static string Enc(string url)
        {
            if (string.IsNullOrEmpty(url))
            {
                return string.Empty;
            }
            else
            {
                return url.Replace(" ", "__").Replace("/", "--");
            }
        }

        public static string Dec(string url)
        {
            if (string.IsNullOrEmpty(url))
            {
                return string.Empty;
            }
            else
            {
                return url.Replace("__", " ").Replace("--", "/");
            }
        }
    }
}
